package com.jk.smartelderlycare.controller;

import com.jk.smartelderlycare.dto.SysMenu;
import com.jk.smartelderlycare.interfaces.SysMenuServiceApi;
import com.jk.smartelderlycare.service.SysMenuService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author hhk
 * @version 1.0
 * @ClassName SysMenuController
 * @program: smart-elderly-care
 * @description: TODO
 * @date 2024/11/6 16:37
 */
@Slf4j
@RestController
public class SysMenuController implements SysMenuServiceApi {
    @Autowired
    private SysMenuService sysMenuService;
    /** 
     * @description: 查询权限列表
     * @param: [sysMenu]
     * @return: java.util.List<com.jk.smartelderlycare.dto.SysMenu>
     * @author hhk
     * @date: 2024/11/6 16:43
     */ 
    @Override
    public List<SysMenu> findSysMenuList(SysMenu sysMenu) {
        return sysMenuService.findSysMenuList(sysMenu);
    }
    /** 
     * @description: 根据用户id查询权限
     * @param: [userId]
     * @return: java.util.List<java.lang.String>
     * @author hhk
     * @date: 2024/11/6 16:43
     */ 
    @Override
    public List<String> selectPermsByUserId(Long userId) {
        return sysMenuService.selectPermsByUserId(userId);
    }
}
